# standard makefile for framework
#  get games up and running quick
CC = cc
CCFLAGS = -O2 -Wall -fomit-frame-pointer `sdl-config --cflags`

# remove any libs not used, below
LDFLAGS = `sdl-config --libs` \
		-lSDL_mixer \
		-lSDL_net \
		-lSDL_image \
		-lSDL_ttf \
		-lGL

# osc.c provides overserver client support
# texops.cpp is for GL use only
SOURCES = career.c        credits.c       game.c          init_game.c     main.c          movie.c         ui.c \
	cfg_parse.c     error.c         hangar.c        load_ops.c      menu.c          texops.c

OBJECTS=$(SOURCES:.c=.o) \

NAME = miscopter

all: $(SOURCES) $(NAME)

$(NAME): $(OBJECTS)
	$(CC) -o $@ $(OBJECTS) $(LDFLAGS)

clean:
	rm -f *.o $(NAME)

.cpp.o:
	$(CC) -c $(CCFLAGS) $< -o $@

.c.o:
	$(CC) -c $(CCFLAGS) $< -o $@
